#region Using directives
using System;
using System.Collections.Generic;
using System.Text;
using webapp4U.DAL;
#endregion


namespace webapp4U.BOL
{
	 public class NavigationMenu : BizObject
	 {
	     #region Member Variables

	     private Int32 _menuID;

	     private Int32 _cateID;

	     private String _title;

	     private String _title_en;

	     private String _content;

	     private String _content_en;

	     private String _linkText;

	     private String _target;

	     private Boolean _isActive;

	     private Int32 _displayOrder;

	     #endregion



	     #region Public Properties

	     public Int32 MenuID
	     {
		     get { return _menuID; }
		     set { _menuID = value; }
	     }

	     public Int32 CateID
	     {
		     get { return _cateID; }
		     set { _cateID = value; }
	     }

	     public String Title
	     {
		     get { return _title; }
		     set { _title = value; }
	     }

	     public String Title_en
	     {
		     get { return _title_en; }
		     set { _title_en = value; }
	     }

	     public String Content
	     {
		     get { return _content; }
		     set { _content = value; }
	     }

	     public String Content_en
	     {
		     get { return _content_en; }
		     set { _content_en = value; }
	     }

	     public String LinkText
	     {
		     get { return _linkText; }
		     set { _linkText = value; }
	     }

	     public String Target
	     {
		     get { return _target; }
		     set { _target = value; }
	     }

	     public Boolean IsActive
	     {
		     get { return _isActive; }
		     set { _isActive = value; }
	     }

	     public Int32 DisplayOrder
	     {
		     get { return _displayOrder; }
		     set { _displayOrder = value; }
	     }

	     #endregion

	     #region public static Methods
	     public static int Insert(NavigationMenu obj)
	     {
		     NavigationMenuDAL db = new NavigationMenuDAL();
		     return db.Insert(obj);
	     }

	     public static bool Update(NavigationMenu obj)
	     {
		     NavigationMenuDAL db = new NavigationMenuDAL();
		     return db.Update(obj);
	     }

	     public static bool Delete(Int32 MenuID)
	     {
		     NavigationMenuDAL db = new NavigationMenuDAL();
		     return db.Delete(MenuID); 
	     }

	     public static NavigationMenu GetNavigationMenuByID(Int32 MenuID)
	     {
		     NavigationMenuDAL db = new NavigationMenuDAL();
		     return db.GetNavigationMenuByID(MenuID);
	     }


         //Get All NavigationMenu
         public static List<NavigationMenu> GetAllNavigationMenu()
         {
             NavigationMenuDAL db = new NavigationMenuDAL();
             return db.GetAllNavigationMenu(1, MAXROWS);
         }


	     //Get All NavigationMenu
	     public static List<NavigationMenu> GetAllNavigationMenu(int PageIndex, int PageSize)
	     {
		     NavigationMenuDAL db = new NavigationMenuDAL();
		     return db.GetAllNavigationMenu(PageIndex, PageSize);
	     }

	     // Get Count All records of Table  NavigationMenu
	     public static int GetCountNavigationMenu()
	     {
		     NavigationMenuDAL db = new NavigationMenuDAL();
		     return db.GetCountNavigationMenu();
	     }


         // Get NavigationMenuByCateID
         public static List<NavigationMenu> GetNavigationMenuByCateID(Int32 CateID)
         {
             NavigationMenuDAL db = new NavigationMenuDAL();
             return db.GetNavigationMenuByCateID(CateID, 1, MAXROWS);
         }


         // Get NavigationMenuByCateID
         public static List<NavigationMenu> GetNavigationMenuByCateID(Int32 CateID, int PageIndex, int PageSize)
         {
             NavigationMenuDAL db = new NavigationMenuDAL();
             return db.GetNavigationMenuByCateID(CateID, PageIndex, PageSize);
         }

         // Get NavigationMenuCountByCateID
         public static int GetNavigationMenuCountByCateID(Int32 CateID)
         {
             NavigationMenuDAL db = new NavigationMenuDAL();
             return db.GetNavigationMenuCountByCateID(CateID);
         }


	     #endregion
	 }
}
